package com.google.cart.feign;

import com.google.cart.entity.GoodsEntity;
import com.google.cart.feign.fallback.ProductFeignServiceFallBack;
import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
import com.netflix.hystrix.contrib.javanica.annotation.HystrixProperty;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(value = "product",fallback = ProductFeignServiceFallBack.class)
public interface ProductFeignService {

    @PostMapping("/generator/goods/getCart")
    List<GoodsEntity> getCart();//每个参数前加注解

    @GetMapping("/test/{id}")
    String test(@PathVariable("id") Integer id) ;


    @GetMapping("/t2")
    String t2(@RequestParam Integer id);


}
